#!/bin/bash - 
#===============================================================================
#
#          FILE: dd_plot.sh
# 
#         USAGE: ./dd_plot.sh 
# 
#   DESCRIPTION: 
# 
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: YOUR NAME (), 
#  ORGANIZATION: 
#       CREATED: 03.05.2013 12.26.46 EEST
#      REVISION:  ---
#===============================================================================

set -o nounset                              # Treat unset variables as an error
echo "set terminal epslatex color colortext
  set output \"${0%.sh}.tex\"
  set ylabel 'Writespeed (MB/s)'
  set xlabel 'Write block size'
  set logscale x 2
  #set title 'Write speed to 14 disk software raid 0 with 4096MB file from shm'
  set xtics ( \"256KB\" 262144, \"1MB\" 1048576, \"4MB\" 4194304, \"16MB\" 16777216, \"64MB\" 67108864, \"256MB\" 268435456)
  set yrange [0:1000]
  set key right bottom
  plot 'data/dd_direct' title 'dd with oflag=direct' w l lw 5 lt 1, \
  'data/dd_nodirect' title 'dd with conv=fdatasync' w l lw 5 lt 1 lc rgb 'green', \
  'data/dd_nodirect_reverse' title 'dd with conv=fdatasync in reverse order' w l lw 5 lt 1 lc rgb 'blue' "|gnuplot -persist

